package com.cet.designpatterns.singleton.type2;

class Singleton{

    private static Singleton instance;

    static{
        instance = new Singleton();
    }

    //1、构造私有化
    private Singleton() {

    }


    //3、提供一个公有的静态方法，返回实例对象
    public static Singleton getInstance() {
        return instance;
    }
}
